home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_04 / 9n04095a < prev    next >
Text File  |  1991-02-04  |  328b  |  15 lines

  1.  
  2. /* the following appears in the "globals" header file(s) */
  3. #ifdef IN_MAIN
  4. #define declare( obj, init ) obj = init
  5. #else
  6. #define declare( obj, init ) extern obj;
  7. #endif
  8.  
  9. /* the declarations/definitions */
  10.  
  11. declare( int i, 10 );
  12. declare( char str[], "An initialized string" );
  13. declare( int w[ 10 ][10 ], { 0 } );
  14.  
  15.